<style>
.items_list table tr .forbid{
	font-size:13px;
}
.items_list table{
	font-size:12px;
	border-collapse:collapse;
	border:1px solid #000000;
	line-height:24px;
}
.items_list table tr th{
	border:1px solid #000000;
	font-size:13px;
}
.items_list table tr td{
	border:1px solid #000000;
}
</style>
<?php if(empty($report)){?>
<div class="right_side_operate_area">
	<div class="right_side_title left">
		<h2><?php echo __($cuser['groupid'])?>已投用载体项目入驻情况表<?php echo $forbname?></h2>
	</div>
	<?php  
		echo '<div class="right back_btn">';
		echo $html->link("导出报表","/searchs/carrierin/1".$fid);
		echo '</div>';
	?>
    <div class="clear"></div>
</div>
<div class="right_side_scollbar">
    <div class="detail_info_panel">
        <div class="items_list">
<?php }?>
			<?php 
			if(!empty($report)){
				echo "<div align='center'><h3>".__($cuser['groupid'])."已投用载体项目入驻情况表".$forbname."</h3></div>";
			}
			?>
        	<table border='1'>
            	<tr>
            		<th>序号</th>
                    <th>企业名称</th>
                    <th>注册时间</th>
                    <th>注册资本（万元）</th>
                    <th>法人代表</th>
                  	<th>职工数量</th>
                    <th>入驻位置</th>
                    <th>面积（平方米）</th>
                    <th>租赁时间</th>
                </tr>
                <?php 
                if($forbids){
                	foreach($forbids as $forbid){
                		$forbid_str = $forb[$forbid["comp_carrierleases"]["forbid"]];
                		if($forbname==""){
	                		echo "<tr><td colspan='9' height='24px' align='center' class='forbid'><b>".$forbid_str."</b></td></tr>";
                		}
	                	$index = 0;
	                	$companys = $forbid["companys"];
						foreach($companys as $company){
							$index++;
							$id = $company["SearchCompany"]["id"];
							$company_name = $company["SearchCompany"]["company_name"];
							$objcarleas = $company["CompCarrierlease"];
							$objcarleacount = count($objcarleas);
							$i=0;
							if(!empty($objcarleas)){
								foreach($objcarleas as $carrierlease){
									$location = $carrierlease["location"];
									echo "<tr>";
									if($i == 0){
										echo "<td align='center' rowspan='".$objcarleacount."'>".$index."</td>";
										echo "<td align='center' rowspan='".$objcarleacount."'>".$company_name."</td>";
										echo "<td align='center' rowspan='".$objcarleacount."'>".date("Y-m-d",strtotime($company["SearchCompany"]["reg_time"]))."</td>";
										echo "<td align='center' rowspan='".$objcarleacount."'>".$company["SearchCompany"]["capital"]."</td>";
										echo "<td align='center' rowspan='".$objcarleacount."'>".$company["SearchCompany"]["contact"]."</td>";
										echo "<td align='center' rowspan='".$objcarleacount."'>".$str->formatquantity($company["SearchCompany"]["workers"])."</td>";
									}
									echo "<td align='center' >".$location."</td>";
									echo "<td align='center' >".$carrierlease["area"]."</td>";
									$starttime = date("Y-m-d",strtotime($carrierlease["starttime"]));
									$deadline = date("Y-m-d",strtotime($carrierlease["deadline"]));
									echo "<td align='center' >".$starttime."到".$deadline."</td>";
									echo "</tr>";
									$i++;
								}
							}
							if($i==0){
								echo "<tr>";
								echo "<td>".$index."</td>";
								echo "<td align='center'>".$company_name."</td>";
								echo "<td></td><td></td><td></td><td></td><td></td><td></td><td></td>";
								echo "</tr>";
							}
						}
                	}
				}?>
            </table>
<?php if(empty($report)){?>
		</div>
    </div>
</div>

<?php }?>